const Base = require("../base.js");
/*
修改排序位置
*/
module.exports = class extends Base {
  async indexAction() {
    const databaseName = this.get("databaseName");
    const jhsdr=this.get("sjk")||'mysql'
    const id=  this.get("id")
    const dataBase = this.model(databaseName,jhsdr);
    await dataBase.where({id}).update({paixu:this.get("paixu")})
    this.success("操作成功！")
  }
  async openidpxAction() {
    const databaseName = this.get("databaseName");
    const jhsdr=this.get("sjk")||'mysql'
    const openid=  this.get("openid")
    const dataBase = this.model(databaseName,jhsdr);
    await dataBase.where({openid}).update({paixu:this.get("paixu")})
    this.success("操作成功！")
  }
}